package com.csun.nusing.ui.activity;

import android.os.Bundle;
import android.view.View;

import com.csun.nusing.R;
import com.csun.nusing.bean.jsonbean.DeviceAlarmDateByIdJsonBean;
import com.csun.nusing.bean.jsonbean.DeviceAlarmDateByIdJsonBean.DeviceAlarmDateByIdDataBean;
import com.csun.nusing.presenter.CommonPresenter;
import com.csun.nusing.ui.BaseActivity;

import java.util.List;

/**
 * 报警器详情界面 ClassName: AlarmDetailActivity
 * 
 * @Description: TODO
 * @author fzq
 * @date 2017-11-3
 */
public class AlarmDetailActivity extends BaseActivity<CommonPresenter> {

	private Bundle isFamilyFlag;
	private String deviceId;
	private String authorization;
	protected DeviceAlarmDateByIdJsonBean devicesearchalarmJsonBean;

	@Override
	public int getContentViewId() {
		return R.layout.activity_device_alarm_detail;
	}

	@Override
	public void initSubViews(View view) {
		super.initSubViews(view);
		initView();
	}

	private void initView() {
		
	}

	@Override
	public void initData() {
		super.initData();
		deviceId = getIntent().getStringExtra("deviceId");
		
//		/**
//		 * 请求数据
//		 */
//		authorization = (String) SPUtils.get(this, "authorization", "");
//		Map<String, String> param = new HashMap<String, String>();
//		param.put("oldmanId", "" + olderId);
//		param.put("pageNo", "1");
//		param.put("pageSize", "10");
//		OkHttpTask.newInstance(this).post(param, OkType.form)
//				.addHeader("authorization", authorization)
//				.enqueue(new IOkTaskCallback() {
//					@Override
//					public void onSuccess(String result) {
//						if (result != null) {
//							Log.e("fzq", "-------" + result);
//							Gson gson = new Gson();
//							nursingdevicealarmbean = gson.fromJson(result,
//									AlertDeviceAllJsonBean.class);
//							if (nursingdevicealarmbean != null) {
//								if (nursingdevicealarmbean.getData() != null) {
//									controlAlarmList(nursingdevicealarmbean
//											.getData());
//								}
//							}
//						}
//					}
//				}).start(UrlBean.ALERTDEVICEURL);
	}

	protected void controlData(List<DeviceAlarmDateByIdDataBean> data) {
		
	}

}
